package com.jourwon.springcloud.common;


/**
 * @Author: luojm
 * @CreateDate: 2020/5/15 16:04
 */
public interface SecurityConstants {
    /**角色前缀*/
    String ROLE = "ROLE_";

    /**默认登录URL*/
    String OAUTH_TOKEN_URL = "/oauth/token";

    /**手机登录*/
    String MOBILE_TOKEN_URL = "/mobile/token";

    /**grant_type*/
    String REFRESH_TOKEN = "refresh_token";

    /**sys_oauth_client_details 表的字段，不包括client_id、client_secret*/
    String CLIENT_FIELDS = "client_id, client_secret, resource_ids, scope, "
            + "authorized_grant_types, web_server_redirect_uri, authorities, access_token_validity, "
            + "refresh_token_validity, additional_information, autoapprove";

    /**JdbcClientDetailsService 查询语句*/
    String BASE_FIND_STATEMENT = "select " + CLIENT_FIELDS
            + " from sys_oauth_client_details";

    /**默认的查询语句*/
    String DEFAULT_FIND_STATEMENT = BASE_FIND_STATEMENT + " order by client_id";

    /**按条件client_id 查询*/
    String DEFAULT_SELECT_STATEMENT = BASE_FIND_STATEMENT + " where client_id = ?";

}
